﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace CNCSoft.ErpApps.TMS.longcommon
{
    public static class LongCommon
    {
        public static void OpenForm(string Folder, string strFormName)
        {
            try
            {
                object o = Activator.CreateInstance(Type.GetType(String.Format("CNCSoft.ErpApps.TMS{0}{1}", Folder, strFormName)), true);
                
                Form f = new Form();
                f = (Form)o;
                f.MdiParent = FormMain.ActiveForm;
                f.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
